﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel.DataAnnotations;

namespace GranitePackageSystem.Models
{
    public class PONumber
    {
        #region PO Number
        private string _poNumber;
        [Required(ErrorMessage = "PO Number Required")]
        [StringLength(10, MinimumLength = 1, ErrorMessage = "PO Numbers must be 1 - 10 Characters")]
        [RegularExpression(@"[0-9]*", ErrorMessage = @"PO Numbers may only contain numbers")]

        public string PO_Number
        {
            get { return _poNumber; }
            set
            {
                Validator.ValidateProperty(value, new ValidationContext(this, null, null) { MemberName = "PONumber" });
                _poNumber = value;
            }
        }
        #endregion
    }
}
